package com.hospital.warehouse.sys_user.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author Mr. YR
 * @since 2020-04-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_user")
public class Sys_user extends Model<Sys_user> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "user_id", type = IdType.AUTO)
    private Integer user_id;

    @TableField("loginname")
    private String loginname;

    @TableField("password")
    private String password;

    @TableField("salt")
    private String salt;

    @TableField("realname")
    private String realname;

    @TableField("identitycard")
    private String identitycard;

    @TableField("sex")
    private Integer sex;

    @TableField("phone")
    private String phone;

    @TableField("address")
    private String address;

    @TableField("role_id")
    private Integer role_id;

    @TableField("flag")
    private Integer flag;


    @Override
    protected Serializable pkVal() {
        return this.user_id;
    }

}
